﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data.OleDb;
using System.Configuration;

public partial class AdminAccessUserdata : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        String CS = ConfigurationManager.ConnectionStrings["myDBConnection"].ConnectionString;
        using (SqlConnection myConnection = new SqlConnection(CS))
        {
            SqlCommand command = new SqlCommand("Select * from customer_new", myConnection);
            myConnection.Open();
            SqlDataReader reader = command.ExecuteReader();
            GridView1.DataSource = reader;
            GridView1.DataBind();
            myConnection.Close();
        }
    }
}